<!-- Main content -->
    <section class="content">
      <!-- Your Page Content Here -->
	<div class="col-md-6">
          <!-- Horizontal Form -->
          <div class="box box-info">
            <div class="box-header with-border">
              <h3 class="box-title">修改系统用户</h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form class="form-horizontal" id="editadmin" method="post" action="__MODULE__/admin/editadmin">
              <input type="hidden" name="userid" value="{$user.userid}">
              <div class="box-body">
                <div class="form-group">
                  <label for="inputname" class="col-sm-2 control-label">账号</label>
				  <div class="col-sm-10">
                    <input type="text" class="form-control" name="username" id="inputname" value="{$user.username}">
                  </div>
                </div>

				<div class="form-group">
                  <label for="inputpw" class="col-sm-2 control-label">新密码</label>
                  <div class="col-sm-10">
                    <input type="password" class="form-control" name="password" id="inputpw">
                  </div>
                </div>

				<div class="form-group">
                  <label for="inputckpw" class="col-sm-2 control-label">确认新密码</label>
                  <div class="col-sm-10">
                    <input type="password" class="form-control" name="checkpw" id="inputckpw">
                  </div>
                </div>

				<div class="form-group">
                  <label class="col-sm-2 control-label">所属用户组</label>
                  <div class="col-sm-10">
					     <select class="form-control" name="group_id">
                  <volist name="group" id="vo">
                  <option value="{$vo.id}" <if condition="$user[groupid] eq $vo[id]">selected="selected"</if> >{$vo.title}</option>
                  </volist>
                </select>
                  </div>
                </div>

              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                <button type="button" id="refresh" class="btn btn-default">不理返回</button>
                <button type="button" id="subtn" class="btn btn-info pull-right">确定</button>
              </div>
              <!-- /.box-footer -->
            </form>
          </div>
          <!-- /.box -->
 
        </div>
    </section>
    <!-- /.content -->
<script type="text/javascript">
  $("#subtn").on("click",function(){
      var formdata = $("#editadmin").serialize();
      var url = $("#editadmin").attr("action");
      $.post(url,formdata,function(data){
          if (data == '1') {
            alert("修改成功");
            refresh();
          }else{
            alert("修改失败");
          }
      });
  });

  $("#refresh").on("click",function(){
      refresh();
  });

  function refresh(){
      $("#mcont").load("__MODULE__/admin/adminlist");
  }
</script>